package com.hqully.smartfumehood.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
/**
 * <p>
 *     空气数据实体类
 * </p>
 * @author liulingyu
 * @date 2022-06-24 10:33
 * @version 1.0
 */
@Data
public class AirData implements Serializable {
    /**
     * 
     */
    private Long id;


    private Long APId;

    /**
     * 
     */
    private Long airId;

    /**
     * 
     */
    private Float temp;

    /**
     * 
     */
    private Float humi;

    private Float tvoc;
    /**
     * 
     */
    private Float hcho;

    /**
     *
     */
    private Float co2;

    /**
     * 
     */
    private LocalDateTime time;


    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AirData other = (AirData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAPId() == null ? other.getAPId() == null : this.getAPId().equals(other.getAPId()))
            && (this.getAirId() == null ? other.getAirId() == null : this.getAirId().equals(other.getAirId()))
            && (this.getTemp() == null ? other.getTemp() == null : this.getTemp().equals(other.getTemp()))
            && (this.getHumi() == null ? other.getHumi() == null : this.getHumi().equals(other.getHumi()))
            && (this.getTvoc() == null ? other.getTvoc() == null : this.getTvoc().equals(other.getTvoc()))
            && (this.getHcho() == null ? other.getHcho() == null : this.getHcho().equals(other.getHcho()))
            && (this.getCo2() == null ? other.getCo2() == null : this.getCo2().equals(other.getCo2()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAPId() == null) ? 0 : getAPId().hashCode());
        result = prime * result + ((getAirId() == null) ? 0 : getAirId().hashCode());
        result = prime * result + ((getTemp() == null) ? 0 : getTemp().hashCode());
        result = prime * result + ((getHumi() == null) ? 0 : getHumi().hashCode());
        result = prime * result + ((getTvoc() == null) ? 0 : getTvoc().hashCode());
        result = prime * result + ((getHcho() == null) ? 0 : getHcho().hashCode());
        result = prime * result + ((getCo2() == null) ? 0 : getCo2().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", APId=").append(APId);
        sb.append(", airId=").append(airId);
        sb.append(", temp=").append(temp);
        sb.append(", humi=").append(humi);
        sb.append(", tvoc=").append(tvoc);
        sb.append(", hcho=").append(hcho);
        sb.append(", co2=").append(co2);
        sb.append(", time=").append(time);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}